package com.example.demo.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
public class TestController {
    private int index = 1;
    @RequestMapping(value = "/test")
    public synchronized String test(String id) {
        String tmp = "这是一个日志测试的controller"+index++;
        log.info(tmp);
        return tmp;
    }
}